import React, { Component } from 'react';
import { Button } from 'antd-mobile';
import './Address.scss'


class Address extends Component {
	constructor(props) {
		super(props);
		this.state = {
		}
	}
	componentDidMount() {
    document.getElementsByTagName('title')[0].innerHTML = '新增地址';
  }
	render() {
		let height = window.screen.height
		return (
			<div className='address' style={{ minHeight: height + 'px' }}>
				<div className='addressitem'>
					<div className='addressitem_top'>
						<div>收货人：<span>占奇栋</span><span>17637930507</span></div>
						<div style={{ color: '#666' }}>北京市昌平区霍营小区</div>
					</div>
					<div className='addressitem_bottom'>
						<div style={{ flex: 1 }}>
							<img src={require('../../images/dui.png')} alt="" />
							设为默认
						</div>
						<div style={{ marginRight: 20 }}>
							<img src={require('../../images/edit.png')} alt="" />编辑
            </div>
						<div>
							<img src={require('../../images/del.png')} alt="" />删除
            </div>
					</div>
					<div className='bborder'></div>
				</div>

				<div className='addressitem'>
					<div className='addressitem_top'>
						<div>收货人：<span>占奇栋</span><span>17637930507</span></div>
						<div style={{ color: '#666' }}>北京市昌平区霍营小区</div>
					</div>
					<div className='addressitem_bottom'>
						<div style={{ flex: 1 }}>
							<img src={require('../../images/unfouced.png')} alt="" />设为默认
            </div>
						<div style={{ marginRight: 20 }}>
							<img src={require('../../images/edit.png')} alt="" />编辑
            </div>
						<div>
							<img src={require('../../images/del.png')} alt="" />删除
            </div>
					</div>
				</div>

				<Button className='button'
					onClick={() => {
						this.props.history.push({
							pathname: '/addaddress',
						})
					}}>＋ 添加新地址</Button>
			</div>
		);
	}
}

export default Address;
